package at.fhooe.stefanirndorfer.entity;

import at.fhooe.stefanirndorfer.game.Game;
import at.fhooe.stefanirndorfer.graphics.Visual;


public abstract class Entity extends Visual{

	protected double width;
	protected double height;
	protected double posX;
	protected double posY;
	
	public Entity(double width, double height, double posX, double posY){
		super();
		this.width = width;
		this.height = height;
		this.posX = posX;
		this.posY = posY;
		setUpEntity();
		
	}
	
	public abstract void update(int delta);
	
	public abstract double[] getPosition();
	
	void setUpEntity(){
		Game.getInstance().getEntityManager().addEntity(this);
	}
	
	public void tearDownEntity(){
		Game.getInstance().getEntityManager().removeEntity(this);
	}

	public double getWidth() {
		return width;
	}

	public void setWidth(int width) {
		this.width = width;
	}

	public double getHeight() {
		return height;
	}

	public void setHeight(int height) {
		this.height = height;
	}

	public double getPosX() {
		return posX;
	}

	public void setPosX(double posX) {
		this.posX = posX;
	}

	public double getPosY() {
		return posY;
	}

	public void setPosY(double posY) {
		this.posY = posY;
	}
	
}
